package com.csxy.lsh.controller;

import com.csxy.lsh.R;
import com.csxy.lsh.entity.CrmBanner;
import com.csxy.lsh.service.CrmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/cmsservice/bannerFront")
public class BannerFrontController {

        @Autowired
        private CrmService crmService;

        @GetMapping("getAll/")
        public R getAll() {
            List<CrmBanner> list = crmService.getAllBanner();
            return R.ok().data("list", list);
        }
    }

